import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/pages/Layout'
import Detail from '@/pages/Detail'
import Car from '@/pages/details/Car'
import Hill from '@/pages/details/Hill'
import Earth from '@/pages/details/Earth'
import Loud from '@/pages/details/Loud'

Vue.use(Router)

export default new Router({
    routes:[
        {
            path:'/',
            name:'Layout',
            component: Layout
        },
        {
            path:'/detail',
            name:'detail',
            component: Detail,
            redirect:'/detail/car',
            children:[
                {
                    name:'Car',
                    path:'car',
                    component: Car
                },
                {
                    name:'Hill',
                    path:'hill',
                    component: Hill
                },
                {
                    name:'Earth',
                    path:'earth',
                    component: Earth
                },
                {
                    name:'Loud',
                    path:'loud',
                    component: Loud
                },
            ]
        }
    ]
})